package com.scau.service.impl.business;

import java.io.Serializable;

import org.springframework.stereotype.Component;

import com.scau.exception.BusinessException;
import com.scau.model.business.Cutting;
import com.scau.service.BaseService;
@Component
public class CuttingService extends BaseService<Cutting> implements Serializable{
	public void save(Cutting cutting) throws BusinessException{
		if (null != cutting) {
			if(null != cutting.getId() && 0 != cutting.getId()){
				update(cutting);
			}else{
				add(cutting);
			}
		}else {
			throw new BusinessException("开料项的ID不能为空!");
		}
	}
}
